<template>
  <div class="newPage rowFlex allCenter">
    <el-pagination
      :total="Number(pageInfo.total)"
      :current-page.sync="pageInfo.page"
      :page-size="Number(pageInfo.page_size)"
      background
      layout="total,prev, pager, next, jumper"
      @current-change="handleCurrentChange"
    >
    </el-pagination>
  </div>
</template>

<script type="text/javascript">
export default {
  props: ['pageInfo'],
  data() {
    return {}
  },
  mounted() {
  },
  methods: {
    handleCurrentChange(newPage) {
      this.pageInfo.page = newPage
      this.$emit('requestNextPage', this.pageInfo)
    }
  }
}
</script>

  <style lang="scss" scoped>
  .newPage{
    width: 100%;
    height: 60px;
    background: #fff;
    border-radius: 0 0 5px 5px;
  }
  </style>
